require 'rake'
require 'rdoc/task'
require 'rspec/core/rake_task'
unless defined?(::Rails)
  load File.join(File.dirname(__FILE__), 'lib', 'tasks', 'sitemap_spider.rake')
end

desc 'Default: test specifications.'
task :default => :spec

desc 'Test specifications of sitemap_spider plugin.'
RSpec::Core::RakeTask.new(:spec) do |t|
  t.rspec_opts = ['--options', 'spec/spec.opts']
  t.pattern = 'spec/**/*_spec.rb'
end

desc 'Generate documentation for the sitemap_spider plugin.'
RDoc::Task.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'sitemap_spider'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
